TextLayout Object Example

The following example sets the title text position and orientation for a chart.

Private Sub Command1_Click()
   ' Sets the title text position and orientation.
   With Form1.MSChart1.Title
      .Location.Visible = True
      .Location.LocationType = VtChLocationTypeLeft
      .Text = "Title TextLayout"
   End With
   With Form1.MSChart1.Title.TextLayout
      .Orientation = VtOrientationUp
      .HorzAlignment = VtHorizontalAlignmentCenter
      .VertAlignment = VtVerticalAlignmentCenter
   End With
End Sub